package com.qifan.energy.activity;

import android.os.Bundle;
import android.widget.TextView;

import com.qifan.energy.base.BaseActivity;
import com.qifan.energy.BuildConfig;
import com.qifan.energy.R;
import com.qifan.energy.util.IntentUtils;
import com.tencent.bugly.beta.Beta;

import butterknife.BindView;
import butterknife.OnClick;

public class AboutActivity extends BaseActivity {

    @BindView(R.id.version_name_tv)
    TextView versionNameTv;
    @BindView(R.id.version_name_tv2)
    TextView versionNameTv2;
    @BindView(R.id.telphone_service_tv)
    TextView telphoneServiceTv;
    @BindView(R.id.wx_service_tv)
    TextView wxServiceTv;

    /*@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
    }*/

    @Override
    protected int getLayoutId() {
        return R.layout.activity_about;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        /* 更改状态栏 */
        changeStatusTransparentFontBlack();
    }

    @Override
    protected void initData() {
        versionNameTv.setText(String.format("版本号 %s",BuildConfig.VERSION_NAME));
        versionNameTv2.setText(String.format("当前版本V%s",BuildConfig.VERSION_NAME));
        telphoneServiceTv.setText("13262271065");
        wxServiceTv.setText("xuanzhangran");
    }

    /*@OnClick({R.id.service_mobile_rl,R.id.service_wechat_rl})*/
    @OnClick(R.id.service_mobile_rl)
    void onSericeMobileRlClicked(){
        IntentUtils.dialPhone(this,"13262271065");
    }

    @OnClick(R.id.service_wechat_rl)
    void onserviceWechatRlClicked(){
        /*ClipboardUtils.copyText("weixin");
        ToastUtils.showShort("已经复制");*/
    }

    @OnClick(R.id.version_update_rl)
    void onVersionUpdateRlClicked(){
        /*VersionUpdateDialog dialog = new VersionUpdateDialog();
        dialog.showNow(getSupportFragmentManager(),"version");
        dialog.setEventCallback(new IEventCallback() {
            @Override
            public void onCancel() {
                ToastUtils.showShort("取消");
            }

            @Override
            public void onComfirm() {
                ToastUtils.showShort("确定升级");
            }
        });*/
        Beta.checkUpgrade();
    }
}
